package cn.com.zcode.user.model;

import java.util.Date;

import cn.com.zcode.core.model.BaseModelSupport;

public class LoginInfo extends BaseModelSupport {
	private static final long serialVersionUID = 1L;
	private String username;
	private Date loginTime  ;
	private String ip;
	private boolean fromMobile;
	
	public LoginInfo(User user,String ip) {
		super();
		this.username = user.getUsername();
		this.loginTime = new Date();
		this.ip = ip;
		this.fromMobile = user.isFromMobile();
	}
	public LoginInfo() {
		super();
	}
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public Date getLoginTime() {
		return loginTime;
	}
	public void setLoginTime(Date loginTime) {
		this.loginTime = loginTime;
	}
	public String getIp() {
		return ip;
	}
	public void setIp(String ip) {
		this.ip = ip;
	}
	public boolean isFromMobile() {
		return fromMobile;
	}
	public void setFromMobile(boolean isFromMobile) {
		this.fromMobile = isFromMobile;
	}
	 
		
	
}
